package com.bigplayer.comm.feign;

import com.alibaba.fastjson.JSONObject;
import com.bigplayer.comm.contant.ContantRC;
import com.bigplayer.pojo.DoubleReq;
import com.bigplayer.pojo.ThreeReq;
import lombok.extern.slf4j.Slf4j;

import java.util.HashMap;
import java.util.Map;

@Slf4j
public class BigPlayerApiFallback implements BigPlayerApi {


    private static Map<String, String> failmap = new HashMap<>();

    static {
        failmap.put("code", "9999");
        failmap.put("retCode", "9999");
    }

    @Override
    public String getDouble(String doubleReq) {
        JSONObject jsonResult = new JSONObject();
        jsonResult.put("retCode", ContantRC.FAIL);
        jsonResult.put("retMsg", "系统错误，请稍后再试");
        log.warn("feign调用双色球异常");
        return jsonResult.toJSONString();
    }

    @Override
    public String getThreeData(String threeReq) {
        JSONObject jsonResult = new JSONObject();
        jsonResult.put("retCode", ContantRC.FAIL);
        jsonResult.put("retMsg", "系统错误，请稍后再试");
        log.warn("feign调用3D异常");
        return jsonResult.toJSONString();
    }
}
